﻿// =================================================================== 
// 项目说明
//====================================================================
// 文件： ERP_DemandDetail.cs
// 创建时间：2016/11/29
// 负责人：
// ===================================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using CRMMis.Model;
using CRMMis.IDAL;
using CommonLib.Model;


//注意：该文件自动生成，一般请不要手工修改。


namespace MSSQLDAL
{
    /// <summary>
    /// 数据层实例化接口类 要货单详情表.
    /// </summary>
    public partial class ERP_DemandDetailDAL : IERP_DemandDetailDAL
    {
		
		 #region 变量声明（For update 和 Insert 时）
		// 声明静态变量 
		private const string PARA_DEMANDDETAILID =  "@DEMANDDETAILID";
		private const string PARA_DPLANID =  "@DPLANID";
		private const string PARA_DCARGOID =  "@DCARGOID";
		private const string PARA_DCOUNT =  "@DCOUNT";
		private const string PARA_REMARK =  "@REMARK";

		private const string SQL_UPDATE = "UPDATE ERP_DEMANDDETAIL SET  DEMANDDETAILID= @DEMANDDETAILID, DPLANID= @DPLANID, DCARGOID= @DCARGOID, DCOUNT= @DCOUNT, REMARK= @REMARK  WHERE DEMANDDETAILID = @DEMANDDETAILID ";
		private const string SQL_INSERT = "INSERT INTO ERP_DEMANDDETAIL(DEMANDDETAILID, DPLANID, DCARGOID, DCOUNT, REMARK ) values ( @DEMANDDETAILID, @DPLANID, @DCARGOID, @DCOUNT, @REMARK ) ";
		#endregion
		
		// 查询数据的sql串

		private string TableString;
		
		#region 构造函数


		/// <summary>
		/// ??????
		/// </summary>
		public ERP_DemandDetailDAL()
		{
			if (QueryDataString == "")
                TableString = "ERP_DemandDetail SQL_A";
            else
                TableString = "(" + QueryDataString + ") SQL_A";
		}
		#endregion

        //-----------实例化接口函数-----------
		
		//------------增删改函数------------------- 
		
		#region Add 向数据库中插入一条新记录。

		/// <summary>
		/// 向数据库ERP_DemandDetail中插入一条新记录。
		/// </summary>
		/// <param name="_ERP_DemandDetailModel">ERP_DemandDetail??</param>
		/// <returns>影响的行数</returns>
		public int Add(CRMMis.Model.ERP_DemandDetail _ERP_DemandDetailModel)
		{
			// 声明参数数组并赋值
			SqlParameter[] _param=
			{
				new SqlParameter(PARA_DEMANDDETAILID, SqlDbType.Int), 
				new SqlParameter(PARA_DPLANID, SqlDbType.Int), 
				new SqlParameter(PARA_DCARGOID, SqlDbType.Int), 
				new SqlParameter(PARA_DCOUNT, SqlDbType.Int), 
				new SqlParameter(PARA_REMARK, SqlDbType.VarChar)
			};			
			
			 _param[0].Value =  _ERP_DemandDetailModel.DemandDetailID;
			 _param[1].Value =  _ERP_DemandDetailModel.DPlanID;
			 _param[2].Value =  _ERP_DemandDetailModel.DCargoId;
			 _param[3].Value =  _ERP_DemandDetailModel.DCount;
			 _param[4].Value =  _ERP_DemandDetailModel.Remark;
			
			//  返回
			return (int)SqlHelper.ExecuteNonQuery(Conn.SqlConnStr, CommandType.Text, SQL_INSERT, _param);
		}
        
		#endregion
		
		#region Add 向数据库中插入一条新记录。带事务
        
		/// <summary>
		/// 向数据库ERP_DemandDetail中插入一条新记录。带事务
		/// </summary>
		/// <param name="sp">事务对象</param>
		/// <param name="_ERP_DemandDetailModel">ERP_DemandDetail实体</param>
		/// <returns>影响的行数</returns>
		public int Add(DBTransaction dbTrans,CRMMis.Model.ERP_DemandDetail _ERP_DemandDetailModel)
		{
			// 声明参数数组并赋值
			SqlParameter[] _param=
			{
				new SqlParameter(PARA_DEMANDDETAILID, SqlDbType.Int), 
				new SqlParameter(PARA_DPLANID, SqlDbType.Int), 
				new SqlParameter(PARA_DCARGOID, SqlDbType.Int), 
				new SqlParameter(PARA_DCOUNT, SqlDbType.Int), 
				new SqlParameter(PARA_REMARK, SqlDbType.VarChar)
			};	
			
			 _param[0].Value =  _ERP_DemandDetailModel.DemandDetailID;
			 _param[1].Value =  _ERP_DemandDetailModel.DPlanID;
			 _param[2].Value =  _ERP_DemandDetailModel.DCargoId;
			 _param[3].Value =  _ERP_DemandDetailModel.DCount;
			 _param[4].Value =  _ERP_DemandDetailModel.Remark;
			
			//  返回
			return (int)SqlHelper.ExecuteNonQuery(dbTrans.sql_trans, CommandType.Text, SQL_INSERT, _param);
		}
        
		#endregion
		
		#region	Update 向数据表更新一条记录。	
        
		/// <summary>
		/// 向数据表ERP_DemandDetail更新一条记录。
		/// </summary>
		/// <param name="_ERP_DemandDetailModel">_ERP_DemandDetailModel</param>
		/// <returns>影响的行数</returns>
		public int Update(CRMMis.Model.ERP_DemandDetail _ERP_DemandDetailModel)
		{
			// 声明参数数组并赋值

			SqlParameter[] _param=
			{
				new SqlParameter(PARA_DEMANDDETAILID, SqlDbType.Int), 
				new SqlParameter(PARA_DPLANID, SqlDbType.Int), 
				new SqlParameter(PARA_DCARGOID, SqlDbType.Int), 
				new SqlParameter(PARA_DCOUNT, SqlDbType.Int), 
				new SqlParameter(PARA_REMARK, SqlDbType.VarChar)
			};	
			
			 _param[0].Value =  _ERP_DemandDetailModel.DemandDetailID;
			 _param[1].Value =  _ERP_DemandDetailModel.DPlanID;
			 _param[2].Value =  _ERP_DemandDetailModel.DCargoId;
			 _param[3].Value =  _ERP_DemandDetailModel.DCount;
			 _param[4].Value =  _ERP_DemandDetailModel.Remark;
			
			return SqlHelper.ExecuteNonQuery(Conn.SqlConnStr, CommandType.Text, SQL_UPDATE, _param);
		}
        
		#endregion
		
		#region	Update 向数据表更新一条记录。带事务
        
		/// <summary>
		/// 向数据表ERP_DemandDetail更新一条记录。带事务
		/// </summary>
		/// <param name="sp">事务对象</param>
		/// <param name="_ERP_DemandDetailModel">_ERP_DemandDetailModel</param>
		/// <returns>影响的行数</returns>
		public int Update(DBTransaction dbTrans,CRMMis.Model.ERP_DemandDetail _ERP_DemandDetailModel)
		{
           // 声明参数数组并赋值

		    SqlParameter[] _param=
			{
				new SqlParameter(PARA_DEMANDDETAILID, SqlDbType.Int), 
				new SqlParameter(PARA_DPLANID, SqlDbType.Int), 
				new SqlParameter(PARA_DCARGOID, SqlDbType.Int), 
				new SqlParameter(PARA_DCOUNT, SqlDbType.Int), 
				new SqlParameter(PARA_REMARK, SqlDbType.VarChar)
			};		
			
			 _param[0].Value =  _ERP_DemandDetailModel.DemandDetailID;
			 _param[1].Value =  _ERP_DemandDetailModel.DPlanID;
			 _param[2].Value =  _ERP_DemandDetailModel.DCargoId;
			 _param[3].Value =  _ERP_DemandDetailModel.DCount;
			 _param[4].Value =  _ERP_DemandDetailModel.Remark;
			
			return SqlHelper.ExecuteNonQuery(dbTrans.sql_trans, CommandType.Text, SQL_UPDATE, _param);
		}
        
		#endregion
        
		#region	Delete 根据主键，删除数据表中的一条记录	
        
		/// <summary>
		/// 根据主键，删除数据表ERP_DemandDetail中的一条记录
		/// </summary>
	    /// <param name="demandDetailID">demandDetailID</param>
		/// <returns>影响的行数</returns>
		public int Delete(int demandDetailID)
		{
			// 声明参数数组并赋值
			SqlParameter[] _param=
			{
				new SqlParameter("@demandDetailID", SqlDbType.Int)
			};				
			_param[0].Value = demandDetailID;
			
			string sqlStr="delete from ERP_DemandDetail where  DemandDetailID=@demandDetailID";
			return SqlHelper.ExecuteNonQuery(Conn.SqlConnStr, CommandType.Text, sqlStr, _param);;
		}
        
		#endregion
		
		#region	Delete 根据主键，删除数据表中的一条记录 带事务
        
		/// <summary>
		/// 根据主键，删除数据表ERP_DemandDetail中的一条记录 带事务
		/// <param name="sp">事务对象</param>
	    /// <param name="DemandDetailID">demandDetailID</param>
		/// <returns>影响的行数</returns>
		public int Delete(DBTransaction dbTrans,int demandDetailID)
		{
			// 声明参数数组并赋值

			SqlParameter[] _param=
			{
				new SqlParameter("@demandDetailID", SqlDbType.Int)
			};				
			_param[0].Value = demandDetailID;

			string sqlStr="delete from ERP_DemandDetail where  DemandDetailID=@demandDetailID";
			return SqlHelper.ExecuteNonQuery(dbTrans.sql_trans, CommandType.Text, sqlStr,_param);;

		}
        
		#endregion
		
		#region	DeleteFK 根据条件串，删除数据表中的N条记录	
        
		/// <summary>
		/// 根据条件串，删除数据表ERP_DemandDetail中的N条记录
		/// </summary>
	    /// <param name="sWhere">条件串</param>
		/// <returns>影响的行数</returns>
		public int DeleteFK(string sWhere)
		{
			string  sqlStr="delete from ERP_DemandDetail";
			if (sWhere.Length>0)
				sqlStr += " where "+sWhere;
			return SqlHelper.ExecuteNonQuery(Conn.SqlConnStr, CommandType.Text, sqlStr);
		}
        
		#endregion
		
		#region	DeleteFK 删除数据表中的一条记录,带事务
        
		/// <summary>
		/// 删除数据表ERP_DemandDetail中的一条记录,带事务
		/// </summary>
		/// <param name="sp">事务对象</param>
	    /// <param name="sWhere">条件串</param>
		/// <returns>影响的行数</returns>
		public int DeleteFK(DBTransaction dbTrans,string sWhere)
		{
			string  sqlStr="delete from ERP_DemandDetail";
			if (sWhere.Length>0)
				sqlStr += " where "+sWhere;
			return SqlHelper.ExecuteNonQuery(dbTrans.sql_trans, CommandType.Text, sqlStr);
		}
		
		#endregion
		
		
		//------------获取数据及模型函数

		
		#region Exists 检测是否存在该主键
        
		/// <summary>
        /// 检测是否存在该主键
        /// </summary>
        /// <param name="int demandDetailID" 主键列表</param>
        /// <returns>是/否</returns>
		public bool Exists(int demandDetailID)
		{
			// 声明参数数组并赋值

			SqlParameter[] _param=
			{
				new SqlParameter("@demandDetailID", SqlDbType.Int)
			};				
			_param[0].Value = demandDetailID;
			
            string sqlStr="select Count(*) from ERP_DemandDetail where  DemandDetailID=@demandDetailID and DemandDetailID=@demandDetailID";
						
            int a=Convert.ToInt32(SqlHelper.ExecuteScalar(Conn.SqlConnStr,CommandType.Text,sqlStr,_param));
            if(a>0)
            {
                return true;
            }
            else
            {
                return false;
            }
		}

		#endregion

		#region GetModel 根据主键ID,得到数据实体
        
        /// <summary>
		/// 根据主键ID,得到 erp_demanddetail 数据实体
		/// </summary>
		/// <param name="int demandDetailID" 主键列表</param>
		/// <returns>erp_demanddetail 数据实体</returns>
		public CRMMis.Model.ERP_DemandDetail GetModel(int demandDetailID )
		{
			CRMMis.Model.ERP_DemandDetail _obj=null;
			// 声明参数数组并赋值
            
			SqlParameter[] _param=
			{
				new SqlParameter("@demandDetailID", SqlDbType.Int)
			};				
			_param[0].Value = demandDetailID;
			
			string sqlStr="select * from ERP_DemandDetail where  DemandDetailID=@demandDetailID";
			using(SqlDataReader dr=SqlHelper.ExecuteReader(Conn.SqlConnStr,CommandType.Text,sqlStr,_param))
			{
				while(dr.Read())
				{
            		_obj=PopulateERP_DemandDetailModelFromDr(dr);
				}
			}
			return _obj;
		}
        
		#endregion
        
        #region GetModel where条件,得到数据实体
        /// <summary>
        /// 根据where条件,得到 erp_demanddetail 数据实体
        /// <para>如果存在多条，则返回第一条</para>
        /// </summary>
        /// <param name="sWhere" where条件</param>
        /// <returns> erp_demanddetail 数据实体</returns>
        public CRMMis.Model.ERP_DemandDetail GetModel(string sWhere)
        {
            CRMMis.Model.ERP_DemandDetail _obj = null;
            
            string sqlStr = "select * from ERP_DemandDetail where 1=1 ";
            if (!string.IsNullOrEmpty(sWhere))
                sqlStr += (" and " + sWhere);
            using (SqlDataReader dr = SqlHelper.ExecuteReader(Conn.SqlConnStr, CommandType.Text, sqlStr))
            {
                if (dr.Read())
                {
            		_obj=PopulateERP_DemandDetailModelFromDr(dr);
                }
            }
            return _obj;
        }
        #endregion
		
        #region GetModel 根据主键ID,得到数据实体，带事务
        
        /// <summary>
		/// 根据主键ID,得到 erp_demanddetail 数据实体
		/// </summary>
		/// <param name="int demandDetailID" 主键列表</param>
		/// <returns>erp_demanddetail 数据实体</returns>
		public CRMMis.Model.ERP_DemandDetail GetModel(DBTransaction dbTrans,int demandDetailID )
		{
			CRMMis.Model.ERP_DemandDetail _obj=null;
			// 声明参数数组并赋值
            
			SqlParameter[] _param=
			{
				new SqlParameter("@demandDetailID", SqlDbType.Int)
			};				
			_param[0].Value = demandDetailID;
			
			string sqlStr="select * from ERP_DemandDetail where  DemandDetailID=@demandDetailID";
			using(SqlDataReader dr=SqlHelper.ExecuteReader(dbTrans.sql_trans,CommandType.Text,sqlStr,_param))
			{
				while(dr.Read())
				{
            		_obj=PopulateERP_DemandDetailModelFromDr(dr);
				}
			}
			return _obj;
		}
        
		#endregion
        
        #region GetModel where条件,得到数据实体，带事务
        /// <summary>
        /// 根据where条件,得到 erp_demanddetail 数据实体
        /// <para>如果存在多条，则返回第一条</para>
        /// </summary>
        /// <param name="sWhere" where条件</param>
        /// <returns> erp_demanddetail 数据实体</returns>
        public CRMMis.Model.ERP_DemandDetail GetModel(DBTransaction dbTrans,string sWhere)
        {
            CRMMis.Model.ERP_DemandDetail _obj = null;
            
            string sqlStr = "select * from ERP_DemandDetail where 1=1 ";
            if (!string.IsNullOrEmpty(sWhere))
                sqlStr += (" and " + sWhere);
            using (SqlDataReader dr = SqlHelper.ExecuteReader(dbTrans.sql_trans, CommandType.Text, sqlStr))
            {
                if (dr.Read())
                {
            		_obj=PopulateERP_DemandDetailModelFromDr(dr);
                }
            }
            return _obj;
        }
        #endregion
		
		#region ----根据DataRow,得到 数据实体
		/// <summary>
		/// 得到  erp_demanddetail 数据实体
		/// </summary>
		/// <param name="row">row</param>
		/// <returns>erp_demanddetail 数据实体</returns>
		public CRMMis.Model.ERP_DemandDetail PopulateERP_DemandDetailModelFromDr(DataRow row)
		{
			CRMMis.Model.ERP_DemandDetail Obj = new CRMMis.Model.ERP_DemandDetail();
			if(row!=null)
			{
				Obj.DemandDetailID = (( row["DemandDetailID"])==DBNull.Value)?0:Convert.ToInt32( row["DemandDetailID"]);
				Obj.DPlanID = (( row["DPlanID"])==DBNull.Value)?0:Convert.ToInt32( row["DPlanID"]);
				Obj.DCargoId = (( row["DCargoId"])==DBNull.Value)?0:Convert.ToInt32( row["DCargoId"]);
				Obj.DCount = (( row["DCount"])==DBNull.Value)?0:Convert.ToInt32( row["DCount"]);
				Obj.Remark =  row["Remark"].ToString();
			}
			else
			{
				return null;
			}
			return Obj;
		}
		#endregion
		
		#region ----根据IDataReader,得到 数据实体
        
        /// <summary>
		/// 得到  erp_demanddetail 数据实体
		/// </summary>
		/// <param name="dr">dr</param>
		/// <returns>erp_demanddetail 数据实体</returns>
		public CRMMis.Model.ERP_DemandDetail PopulateERP_DemandDetailModelFromDr(IDataReader dr)
		{
			CRMMis.Model.ERP_DemandDetail Obj = new CRMMis.Model.ERP_DemandDetail();
			
				Obj.DemandDetailID = (( dr["DemandDetailID"])==DBNull.Value)?0:Convert.ToInt32( dr["DemandDetailID"]);
				Obj.DPlanID = (( dr["DPlanID"])==DBNull.Value)?0:Convert.ToInt32( dr["DPlanID"]);
				Obj.DCargoId = (( dr["DCargoId"])==DBNull.Value)?0:Convert.ToInt32( dr["DCargoId"]);
				Obj.DCount = (( dr["DCount"])==DBNull.Value)?0:Convert.ToInt32( dr["DCount"]);
				Obj.Remark =  dr["Remark"].ToString();
			
			return Obj;
		}
        
		#endregion
        
		#region GetNewID 通过种子得到唯一ID,对单主键有效单，如果该表为多主键，则返回第一主键
        
		/// <summary>
        ///  通过种子得到唯一ID,对单主键有效单，如果该表为多主键，则返回第一主键
        /// </summary>
        /// <param name="demandDetailID">demandDetailID</param>
        /// <returns>int</returns>
		public int GetNewID()
		{
			return  DBCommon.GetNewIDForTable("ERP_DemandDetail","ERP_DemandDetail","");
		}
        
		#endregion

		#region	GetMaxID 得到最大ID	
		/// <summary>
		/// 得到最大ID
		/// </summary>
        /// <param name="demandDetailID">demandDetailID</param>
        /// <returns>int</returns>
		public int GetMaxID()
		{
			return  0;
		}
		#endregion
		
		#region	GetList 得到数据表指定字段列表的所有记录，可排序，
		/// <summary>
		/// 得到数据表ERP_DemandDetail所有记录，可排序
		/// </summary>
        /// <param name="sWhere">条件字符串</param>
        /// <param name="sOder">排序字段</param>
		/// <returns>DataSet</returns>
		public DataSet GetList(string sWhere, string sOder)
		{
			string	sqlStr="select * from "+TableString;
				
			if (sWhere.Length > 0)
				sqlStr += " where " + sWhere;
			if (sOder.Length > 0)
				sqlStr += " order by " + sOder;
				
			WriteLog("ERP_DemandDetailDAL", "GetList(string sWhere, string sOder)", sqlStr);
			
			return SqlHelper.ExecuteDataset(Conn.SqlConnStr,CommandType.Text,sqlStr);
		}
		#endregion
        
        #region	GetList 得到数据表指定字段列表的所有记录，可排序，带事务的查询
		/// <summary>
		/// 得到数据表ERP_DemandDetail所有记录，可排序，带事务的查询
		/// </summary>
        /// <param name="dbTrans">事务对象</param>
        /// <param name="sWhere">条件字符串</param>
        /// <param name="sOder">排序字段</param>
		/// <returns>DataSet</returns>
		public DataSet GetList(DBTransaction dbTrans, string sWhere, string sOder)
		{
			string	sqlStr="select * from "+TableString;
				
			if (sWhere.Length > 0)
				sqlStr += " where " + sWhere;
			if (sOder.Length > 0)
				sqlStr += " order by " + sOder;
				
			WriteLog("ERP_DemandDetailDAL", "GetList(string sWhere, string sOder)", sqlStr);
			
			return SqlHelper.ExecuteDataset(dbTrans.sql_trans,CommandType.Text,sqlStr);
		}
		#endregion

		#region GetPageList 根据条件和页号得到某页的记录集,+排序
		/// <summary>
		/// 根据条件和页号得到某页的记录集,+排序
		/// </summary>
        /// <param name="iPageSize">每页记录数</param>
		/// <param name="iPageIndex">页号</param>
		/// <param name="sWhere">条件字符串</param>
		/// <param name="sOder">排序字段</param>
        /// <returns>DataSet</returns>
		public DataSet GetPageList(int iPageSize,int iPageIndex, string sWhere, string sOder)
		{
			if (sOder.Length <=0)
				sOder = "DemandDetailID";
				
			string	sqlStr="select * from (select ROW_NUMBER() OVER(order by "+sOder+" ) as row, * from "+TableString;
			
			if (sWhere.Length > 0)
				sqlStr += " where " + sWhere;
			sqlStr += ") SQL1 where row between "+ Convert.ToString(iPageSize*(iPageIndex-1)+1) +" and "+Convert.ToString(iPageSize*iPageIndex);
			
			WriteLog("ERP_DemandDetailDAL", "GetPageList(int iPageSize,int iPageIndex, string sWhere, string sOder)", sqlStr);
			
			return SqlHelper.ExecuteDataset(Conn.SqlConnStr,CommandType.Text,sqlStr);
		}
		#endregion
		
		#region GetRecorderRowNum 判断某条记录所在的行号
		/// <summary>
		/// 判断某条记录所在的行号，调用者自己计算页号和行号
		/// </summary>
        /// <param name="sWhere">记录显示的条件</param>
        /// <param name="sOder">排序条件</param>
        /// <param name="iPageSize">每页记录数</param>
		/// <param name="主键列表">主键列表，需定位记录的键值</param>
        /// <returns>int 页码</returns>
		public int GetRecorderRowNum(string sWhere, string sOder, int iPageSize, int demandDetailID)
		{
			if (sOder.Length <=0)
				sOder = "DemandDetailID";
				
			// 声明参数数组并赋值
			SqlParameter[] _param=
			{
				new SqlParameter("@demandDetailID", SqlDbType.Int)
			};				
			_param[0].Value = demandDetailID;
			
			string	sqlStr="select row from (select ROW_NUMBER() OVER(order by "+sOder+" ) as row, demandDetailID from "+TableString;
			
			if (sWhere.Length > 0)
				sqlStr += " where " + sWhere;
				
			sqlStr = sqlStr + ") SQL1 where  DemandDetailID=@demandDetailID";
			
			WriteLog("ERP_DemandDetailDAL", "GetRecorderRowNum(string sWhere, string sOder, int iPageSize, int demandDetailID)", sqlStr);
			
			return Convert.ToInt32(SqlHelper.ExecuteScalar(Conn.SqlConnStr,CommandType.Text,sqlStr,_param));
		}
		#endregion
		
				
		#region GetRecorderCount 得到符合条件记录集的记录条数
		/// <summary>
		/// 得到符合条件记录集的记录条数
		/// </summary>
        /// <param name="FlowProcessId">流程ID</param>
		/// <param name="sWhere">条件字符串</param>
        /// <returns>int 记录数</returns>
		public int GetRecorderCount(string FlowProcessId, string sWhere)
		{
			string sqlStr ="";
			
			if (FlowProcessId.Length > 0)
            	sqlStr="select Count(*) from "+TableString+" left join view_wfInstance_state SQL_B on SQL_a.work_id=SQL_b.work_id";
			else
				sqlStr="select Count(*) from "+TableString;
				
			if (sWhere.Length>0)
				sqlStr += " where " + sWhere;
				
			WriteLog("ERP_DemandDetailDAL", "GetRecorderCount(string FlowProcessId, string sWhere)", sqlStr);
			
            return Convert.ToInt32(SqlHelper.ExecuteScalar(Conn.SqlConnStr,CommandType.Text,sqlStr));
		}
		#endregion				
		
		#region----------自定义实例化接口函数----------
		#endregion
		
		#region----------日志-------------------------
		    public void WriteLog(string classname, string methodname, string sql)
			{
				log4net.ILog logDebug = log4net.LogManager.GetLogger("DebugLogger");
				logDebug.Debug("[ClassName]:" + classname + "\r\n[MethodeName]:" + methodname + "\r\n[SqlStr]:\r\n" + sql);
			}
		#endregion
    }
}
